package org.coco.cloud.order.interceptor;

import feign.RequestInterceptor;
import feign.RequestTemplate;
import org.springframework.stereotype.Component;

import java.util.UUID;

/**
 * @Description
 * @Author fengleifl-hzgs
 * @Date 2025/1/27
 * @since
 */
@Component
public class XTokenRequestFeignInterceptor implements RequestInterceptor {
    @Override
    public void apply(RequestTemplate template) {
        System.out.println("XTokenRequestFeignInterceptor ...");
        template.header("X-Token", String.valueOf(UUID.randomUUID()));
    }
}
